@isTest
private class InvoiceAccountControllerTest {

    static testMethod void testMethod1() {
        Account acc1 = TestUtils.createAccount();
        acc1.AccountNumber = '0001';
        insert acc1;

        InoviceAccount__c ia = new InoviceAccount__c();
        ia.Company__c = 'MKSY';
        ia.Account__c = acc1.Id;
        ia.CombineAccount__c = acc1.Id; 
        ia.Only__c = ia.Account__c +''+ia.CombineAccount__c +''+ia.Company__c;
        insert ia ; 

        Map<String,String>d = new Map<String,String>();
        d.put('code','0001');
        d.put('companycode','MKSY');
        d.put('combinecode','0001');
        d.put('accId',acc1.Id );
        d.put('combineaccId',acc1.Id);

        List<Object> data = new List<Object>();
        data.add(d);
        List<InvoiceAccountController.IAccountBean> iaList = InvoiceAccountController.matchAccount(JSON.serialize(data));


        InvoiceAccountController iac=  new InvoiceAccountController();
        iac.init();
        iac.searchJson = EncodingUtil.urlEncode(JSON.serialize(d),'UTF-8');
        iac.search();

        InvoiceAccountController.deleteRecord(new List<String>{ia.Id });
        iac.saveJson = EncodingUtil.urlEncode(JSON.serialize(data),'UTF-8');
        iac.save();



    }
}